//
//  UILabel+GetWidth.m
//  1gene
//
//  Created by 1jiyin on 16/3/25.
//  Copyright © 2016年 1jiyin. All rights reserved.
//

#import "UILabel+GetWidth.h"

@implementation UILabel (GetWidth)
//根据文字计算宽度和高度
-(CGFloat)calculateWidthWithLable:(UILabel *)label
{
    CGSize size=[label.text sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:label.font,NSFontAttributeName, nil]];
    return size.width;
}
@end
